﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPageLayout.master" AutoEventWireup="true" CodeBehind="frmHocphi.aspx.cs" Inherits="BVVD_Website.ql_hoc_vien.frmHocphi" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .rsbHeader ul,
        .rsbListItem ul {
            margin: 0;
            padding: 0;
            width: 100%;
            display: inline-block;
            list-style-type: none;
        }

        .rsbHeader ul {
            padding-left: 5px;
        }

        .col1,
        .col2,
        .col3 {
            margin: 0;
            padding: 0 5px 0 0;
            width: 110px;
            line-height: 14px;
            float: left;
        }
        

        html .rsbSlide,
        html .rsbDropDownSlide {
            z-index: 90002;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="server">
    <div id="Div1" class="mpBottomContent" runat="server">
        <telerik:RadGrid ID="grvHocphi" Skin="Hay" AllowFilteringByColumn="true" MasterTableView-NoMasterRecordsText="Không tìm thấy bản ghi nào" MasterTableView-ShowHeadersWhenNoRecords="true" ClientSettings-ColumnsReorderMethod="Reorder" ClientSettings-AllowColumnsReorder="true" ClientSettings-Animation-AllowColumnReorderAnimation="true" ClientSettings-Animation-ColumnReorderAnimationDuration="300" PageSize="15" AllowSorting="true" ShowGroupPanel="true" AutoGenerateColumns="false" AllowPaging="true" ClientSettings-AllowDragToGroup="true" runat="server" OnNeedDataSource="grvHocphi_NeedDataSource">

            <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />

            <MasterTableView CommandItemDisplay="Top" EnableNoRecordsTemplate="true" CssClass="MasterClass" ShowFooter="true" EditMode="PopUp" Summary="SUMMARY" ShowHeadersWhenNoRecords="true"
                DataKeyNames="RECID">
                <CommandItemSettings ExportToPdfText="Xuất file dạng PDF" ShowExportToPdfButton="true"></CommandItemSettings>
                <CommandItemSettings ExportToExcelText="XUất file dạng Excel" ShowExportToExcelButton="true"></CommandItemSettings>

                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>

                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True"></ExpandCollapseColumn>
                <NoRecordsTemplate>
                    <div>
                        Không có bản ghi nào
                    </div>
                </NoRecordsTemplate>
                <Columns>
                    <telerik:GridEditCommandColumn EditText="Sửa" HeaderStyle-Width="50">
                    </telerik:GridEditCommandColumn>
                    <telerik:GridBoundColumn UniqueName="RECID" Display="false" EditFormColumnIndex="1" HeaderStyle-Width="80" ItemStyle-Width="80" ReadOnly="true" HeaderText="RECIDAAAA" DataField="RECID">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                        <HeaderStyle ForeColor="Silver" Width="20px"></HeaderStyle>
                        <ItemStyle ForeColor="Gray"></ItemStyle>
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="MAHV" HeaderText="Mã học viên" DataField="MAHV">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="MAHV1" HeaderText="Mã học viên" DataField="MAHV">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="SOTIEN" HeaderText="Số tiền" DataField="SOTIEN">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="LOAITIEN" HeaderText="Loại tiền" DataField="LOAITIEN">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

                    <telerik:GridDateTimeColumn UniqueName="NGAYDHP" HeaderText="Ngày đóng học phí" DataField="NGAYDHP"
                        DataFormatString="{0:dd/MM/yyyy}">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridDateTimeColumn>

                    <telerik:GridBoundColumn UniqueName="LAN" HeaderText="Lần đóng" DataField="LAN">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="NGUOITHU" HeaderText="Người thu" DataField="NGUOITHU">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn UniqueName="GHICHU" Display="true" HeaderText="Ghi chú" DataField="GHICHU">
                        <ColumnValidationSettings>
                            <ModelErrorMessage Text=""></ModelErrorMessage>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>


                    <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" HeaderStyle-Width="30" ConfirmDialogType="RadWindow" ConfirmTextFormatString="Bạn chắc chắn muốn xóa bản ghi : \n\n \t Mã học viên : {0} <br> \t số tiền :  {1} \n " ConfirmTextFields="MAHV, SOTIEN" ConfirmTitle="Xác nhận xóa" ConfirmText="Xóa, Hủy" Text="Xóa" UniqueName="btnDelete">
                    </telerik:GridButtonColumn>
                </Columns>
                <EditFormSettings EditFormType="Template" PopUpSettings-ShowCaptionInEditForm="true" PopUpSettings-Width="600" InsertCaption="Thu học phí" PopUpSettings-ZIndex="4000" PopUpSettings-Modal="true" CaptionFormatString="Mã học viên {0}" CaptionDataField="MAHV">
                    <FormTemplate>
                        <div id="rfd-demo-zone" style="overflow: scroll; border: solid; border-color: whitesmoke; border-width: 5px; padding: 6px 6px 6px 6px;">
                            <table width="550" border="0" cellspacing="10" cellpadding="10">
                                <caption>
                                    <telerik:RadSearchBox OnSearch="RadSearchBox1_Search" ID="RadSearchBox1" EmptyMessage="Nhập tên học viên để tìm kiếm" Width="400" CssClass="upAll" Skin="Hay" MinFilterLength="1" EnableAutoComplete="true" ShowSearchButton="true" DataSourceID="SqlDataSource1" runat="server"
                                        MaxResultCount="20" DataValueField="MAHV" DataKeyNames="MAHV,HODEM,TENHV,NGAYSINH"
                                        DataTextField="TENHV">
                                        <DropDownSettings Height="400">
                                            <HeaderTemplate>
                                                <ul>
                                                    <li class="col1">Mã học viên</li>
                                                    <li class="col2">Họ tên</li>
                                                    <li class="col3">Ngày sinh</li>
                                                </ul>
                                            </HeaderTemplate>
                                            <ItemTemplate>
                                                <ul>
                                                    <li class="col1">
                                                        <%# DataBinder.Eval(Container.DataItem, "MAHV") %>
                                                    </li>
                                                    <li class="col2">
                                                        <%# DataBinder.Eval(Container.DataItem, "HODEM") %>
                                                        <%# DataBinder.Eval(Container.DataItem, "TENHV") %>
                                                    </li>
                                                    <li class="col3">
                                                        <%# DataBinder.Eval(Container.DataItem, "NGAYSINH","{0:dd/MM/yyyy}") %>
                                                    </li>
                                                </ul>
                                            </ItemTemplate>
                                        </DropDownSettings>
                                    </telerik:RadSearchBox>
                                </caption>
                                <tr>
                                    <td>Tìm kiếm </td>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td>Mã học viên</td>
                                    <td>
                                        <telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("MAHV")  %>' ID="txtMAHV"></telerik:RadTextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" runat="server" ControlToValidate="txtMAHV" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Số tiền</td>
                                    <td>
                                        <telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("SOTIEN")  %>' ID="txtSOTIEN"></telerik:RadTextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Display="Dynamic" runat="server" ControlToValidate="txtSOTIEN" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>
                                    </td>
                                </tr>

                                <tr>
                                    <td>Loại tiền</td>
                                    <td>

                                        <telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("LOAITIEN")  %>' ID="txtLOAITIEN"></telerik:RadTextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" Display="Dynamic" runat="server" ControlToValidate="txtLOAITIEN" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>

                                    </td>
                                </tr>
                                <tr>
                                    <td>Ngày nộp </td>
                                    <td>
                                        <telerik:RadDatePicker Skin="Telerik"  runat="server" ID="rdpNGAYDHP" DbSelectedDate='<%# Bind("NGAYDHP") %>'></telerik:RadDatePicker>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" Display="Dynamic" runat="server" ControlToValidate="rdpNGAYDHP" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Lần nộp</td>
                                    <td>

                                        <telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("LAN")  %>' ID="txtLAN"></telerik:RadTextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" Display="Dynamic" runat="server" ControlToValidate="txtLAN" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>

                                    </td>
                                </tr>
                                <tr>
                                    <td>Người thu</td>
                                    <td>

                                        <telerik:RadTextBox runat="server" Skin="Telerik" Text='<%# Bind("NGUOITHU")  %>' ID="txtNGUOITHU"></telerik:RadTextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" Display="Dynamic" runat="server" ControlToValidate="txtNGUOITHU" ErrorMessage='<img alt="re-check" src="/images/invalid.png"  />'> </asp:RequiredFieldValidator>

                                    </td>
                                </tr>
                                <tr>
                                    <td>Ghi chú</td>
                                    <td>
                                        <telerik:RadTextBox runat="server" ID="txtGHICHU" Skin="Telerik" TextMode="MultiLine" Text='<%# Bind("GHICHU")  %>'></telerik:RadTextBox></td>
                                </tr>
                                <tr>
                                    <td>footer</td>
                                    <td>
                                        <asp:LinkButton ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Thêm mới" : "Cập nhật" %>'
                                            runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:LinkButton>&nbsp;
                                <asp:LinkButton ID="btnCancel" Text="Hủy" runat="server" CausesValidation="False"
                                    CommandName="Cancel"></asp:LinkButton></td>
                                </tr>
                            </table>
                        </div>
                    </FormTemplate>
                </EditFormSettings>
            </MasterTableView>
            <ClientSettings>
                <ClientEvents OnPopUpShowing="PopUpShowing" />
                <ClientEvents OnRowDblClick="RowDblClick" />
                <Selecting AllowRowSelect="true" />
                <Scrolling AllowScroll="true" UseStaticHeaders="true" />
            </ClientSettings>
            <ExportSettings Excel-Format="Biff" Pdf-DefaultFontFamily="Arial" FileName="Mydata" IgnorePaging="false" Excel-AutoFitImages="true" Excel-FileExtension="xls" HideStructureColumns="true"></ExportSettings>
        </telerik:RadGrid>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString='<%$ ConnectionStrings:BVVDConnectionString %>' SelectCommand="SELECT * FROM [LST_HOCVIEN]"></asp:SqlDataSource>
    <telerik:RadNotification ID="rnAlert" runat="server" Position="TopRight" EnableRoundedCorners="true"
        EnableShadow="true" Skin="Hay" Overlay="true" Animation="Fade" AnimationDuration="1000" Title="Thông báo">
    </telerik:RadNotification>
</asp:Content>
